package ru.study.thinkin.chapter11;

import java.util.*;
import java.util.Map.Entry;

public class PetMap {

	public static void main(String[] args) {
		Map<String,Pet> petMap = new HashMap();
		
		petMap.put("Dog", new Dog());
		Cat c = new Cat();
		petMap.put("Cat",c);
		
		System.out.println(petMap.containsKey("Dog"));
		System.out.println(petMap.containsValue(c));
		
		for(Map.Entry<String,Pet> entry : petMap.entrySet()){
			entry.getKey();
		}
	}
}
